package com.szlanyou.protocol_service;

import android.util.Log;

/**
 * @author 陈章
 * create at 2020/11/24 14:54
 * desc:日志管理
 */
public class LogUtil {
    private final static String TAG = "ProtocolService";
    private static boolean openLog = true;

    public static void setLogOpen(boolean openLogOut) {
        openLog = openLogOut;
    }
    
    public static void d(String log) {
        if (openLog) {
            Log.d(TAG, log);
        }
    }

    public static void d(String tag,String log) {
        if (openLog) {
            Log.d(tag, log);
        }
    }

    public static void e(String log) {
        if (openLog) {
            Log.e(TAG, log);
        }
    }

    public static void e(String tag,String log) {
        if (openLog) {
            Log.e(tag, log);
        }
    }
}
